﻿@{
    ViewBag.Title = "OA";
}

<style type="text/css" >
    .ui-li-static.ui-collapsible > .ui-collapsible-heading {
        margin: 0;
    }

    .ui-li-static.ui-collapsible {
        padding: 0;
    }

    .ui-li-static.ui-collapsible > .ui-collapsible-heading > .ui-btn {
        border-top-width: 0;
    }

    .ui-li-static.ui-collapsible > .ui-collapsible-heading.ui-collapsible-heading-collapsed > .ui-btn,
    .ui-li-static.ui-collapsible > .ui-collapsible-content {
        border-bottom-width: 0;
    }
</style>

<ul data-role="listview" data-inset="true" data-shadow="false">
    <li data-role="list-divider" data-theme="b">报表</li>
    @{
        var data = (List<LandPortMoblieWeb.Models.Premission>)ViewBag.menu;
        if(data!=null&&data.Count>0)
        {
            foreach (var item in data)
            {
               switch(item.Name)
               {
                   case "计划完成汇总表":
                        <li data-role="collapsible" data-iconpos="right" data-inset="false">
                            <h2>@item.Name</h2>
                            <ul data-role="listview" data-theme="b">
                        
                                <li>@Html.ActionLink("进口", "completeIncom", "Report")</li>
                                <li>@Html.ActionLink("出口", "completeExport","Report")</li>
                            </ul>
                        </li>
                       break;
                   case "报表-进口计划汇总表":
                   
                       <li>@Html.ActionLink(item.Name, "importReport", "Report")</li>
                       break;
                   case "报表-出口计划汇总表":
                   
                       <li>@Html.ActionLink(item.Name, "exportReport", "Report")</li>
                       
                       break;
                   case "计划完成汇总表(日)":
                   
                      <li>@Html.ActionLink(item.Name, "completeReport", "Report")</li>
                      
                      break;
                   default:
                   
                       break;
                }
                
            }

        }
}
</ul>

<ul data-role="listview" data-inset="true">
    @{
        
        var menu = (List<LandPortMoblieWeb.Models.Premission>)ViewBag.Knowledge;
        if (menu != null && menu.Count > 0)
        {
           <li data-role="list-divider" data-theme="b">@menu[0].Name</li>
           <li data-role ="collapsible" data-iconpos="right" data-inset="false">
               <h2>文章类别</h2>
               <ul data-role="listview" data-theme="b">
                  @{
                    var article = (List<LandPortMoblieWeb.Models.KnowledgeType>)ViewBag.ArticleType;
                    var attr=new Dictionary<string,object>();
                    attr.Add("data-ajax","false");
                    
                    for (int i = 0; i < article.Count(); i++)
                    {
                       <li>
                           <a href="/Home/Contact?typeid=@article[i].id" data-ajax="false">@article[i].name</a>
                       </li>
                    }
                  } 
               </ul>
           </li>
        }
}
</ul>

<ul data-role="listview" data-inset="true">
    <li data-role="list-divider" data-theme="b">通知</li>
    <li>@Html.ActionLink("通知信息", "MassageInfo", "Home", new { type = "myself" }, null)</li>
</ul>

<ul data-role="listview" data-inset="true">
    <li data-role="list-divider" data-theme="b">设置</li>
    <li>@Html.ActionLink("修改密码", "ChangePassword", "Account", new { type = "myself" }, null)</li>
</ul>